package com.saver.modules.sys.dao;

import com.saver.modules.sys.entity.SysUserRoleEntity;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface SysUserRoleDao extends JpaRepository<SysUserRoleEntity, Long> {

    List<SysUserRoleEntity> findByRoleId(Long roleId);

    List<SysUserRoleEntity> findByUserId(Long userId);

    Integer deleteByUserId(Long userId);

    Boolean findByUserIdAndRoleId(Long userId, Long roleId);
}
